<!DOCTYPE html>
<html xmlns:ajxp>
<head>
    <title>Pydio</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <?php if(isSet($START_PARAMETERS) && isSet($START_PARAMETERS["REBASE"])){
        echo '<base href="'.$START_PARAMETERS["REBASE"].'"/>';
    }?>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="icon" type="image/x-png" href="<?php print(AJXP_THEME_FOLDER);?>/images/html-folder.png">
    <!--[if IE 8]>
    <script src="plugins/gui.ajax/res/js/vendor/es6/es5-shim.min.js"></script>
    <script src="plugins/gui.ajax/res/js/vendor/es6/es5-sham.min.js"></script>
    <![endif]-->
    <!--[if IE 7]>
    <script src="plugins/gui.ajax/res/js/vendor/es6/json3.min.js"></script>
    <![endif]-->
    <script src="plugins/gui.ajax/res/js/ui/prototype/util/he.js"></script>
    <?php
    print($ADDITIONAL_FRAMEWORKS);

$list = AJXP_INSTALL_PATH."/".AJXP_THEME_FOLDER."/css/allz_list.txt";
$lines = file($list);
foreach ($lines as $line){
	print("<link rel=\"stylesheet\" type=\"text/css\" href=\"".CLIENT_RESOURCES_FOLDER."/".trim($line)."\">\n");
    }
    ?>

    <?php
$list = AJXP_INSTALL_PATH."/".CLIENT_RESOURCES_FOLDER."/js/ajaxplorer_boot_list.txt";
$lines = file($list);
foreach ($lines as $line){
	print("<script language=\"javascript\" type=\"text/javascript\" src=\"".CLIENT_RESOURCES_FOLDER."/".trim($line)."\"></script>\n");
}
?>
</head>
<body style="overflow:hidden;">
        <div id="ajxp_desktop" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height","fitParent":"window","fitMarginBottom":"$(\"optional_bottom_div\").getHeight()"}'></div>

        <script type="text/javascript">
window.ajxpNoNotifLoader = true;
window.ajxpThemeSkipLoaderProgress = true;
var ajaxplorer, startParameters = {};
<?php if($JSON_START_PARAMETERS) print "startParameters = ".$JSON_START_PARAMETERS.";"; ?>
window.ajxpBootstrap = new AjxpBootstrap(startParameters);
    </script>
    <?php
$list = AJXP_INSTALL_PATH."/".CLIENT_RESOURCES_FOLDER."/js/ajaxplorer_core.txt";
$lines = file($list);
foreach ($lines as $line){
	print("<script language=\"javascript\" type=\"text/javascript\" src=\"".CLIENT_RESOURCES_FOLDER."/".trim($line)."\"></script>\n");
}
$list = AJXP_INSTALL_PATH."/".CLIENT_RESOURCES_FOLDER."/js/ajaxplorer_ui.txt";
$lines = file($list);
foreach ($lines as $line){
    print("<script language=\"javascript\" type=\"text/javascript\" src=\"".CLIENT_RESOURCES_FOLDER."/".trim($line)."\"></script>\n");
    }
    ?>
    <div id="all_forms">
        <div id="generic_dialog_box" class="dialogBox form-login_form"><div class="dialogTitle"></div><div class="dialogContent"></div></div>
        <div id="hidden_frames" style="display:none;"></div>
        <div id="hidden_forms" style="position:absolute;left:-1000px;"></div>

        <!-- LOGIN SCREEN MUST BE ALREADY IN PAGE TO ENABLE PASSWORD REMEMBERING -->
        <form id="login_form" action="login" style="display:none;" box_width="320" box_padding="0" overlayStyle='{"backgroundColor":"white","opacity":10,"backgroundImage":"url(\"<?php print(AJXP_THEME_FOLDER); ?>/images/grid_t.png\")"}'>
            <input type="hidden" name="get_action" value="login">
            <input type="hidden" name="login_seed" id="login_seed" value="">
            <a href="javascript:pydio.getController().fireAction('switch_language');" title="<?php print($mess[190]);?>" alt="<?php print($mess[190]);?>" class="icon-flag"></a>
            <div class="dialogLegend" ajxp_message_id="180"><?php print($mess[180]);?></div>
            <div>
                <div class="SF_element">
                    <div class="SF_label"><ajxp:message ajxp_message_id="181"><?php print($mess[181]);?></ajxp:message></div>
                    <div class="SF_input"><input type="text" name="userid" class="dialogFocus" placeholder="<?php print($mess[181]);?>"></div>
                </div>
                <div class="SF_element">
                    <div class="SF_label"><ajxp:message ajxp_message_id="182"><?php print($mess[182]);?></ajxp:message></div>
                    <div class="SF_input"><input type="password" name="password" placeholder="<?php print($mess[182]);?>"></div>
                </div>
                <div class="SF_element">
                    <input type="checkbox" class="radio" name="remember_me" id="remember_me"/><label for="remember_me" ajxp_message_id="261"><?php print($mess[261]);?></label>
                </div>
            </div>
        </form>
    </div>
    <script type="text/javascript">
        if(window.React) React.initializeTouchEvents(true);
        document.observe("ajaxplorer:before_gui_load", function(e){
            ajaxplorer.currentThemeUsesIconFonts = true;
            pydio.Parameters.set('currentThemeUsesIconFonts', true);
            document.documentElement.className += " ajxp_theme_orbit";
        });
    </script>

    </body>
</html>